projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7dbffb1
)
Only reduce string score for lengthy strings once.
author
Kim F. Storm
<storm@cua.dk>
Thu, 23 May 2002 10:24:14 +0000
(10:24 +0000)
committer
Kim F. Storm
<storm@cua.dk>
Thu, 23 May 2002 10:24:14 +0000
(10:24 +0000)
lisp/apropos.el
patch
|
blob
|
history
diff --git
a/lisp/apropos.el
b/lisp/apropos.el
index 3b7072eb3ed2045ea5f39ffbe4c08cea46217898..8d1e163bd801b481b34bc87a023b41e648268756 100644
(file)
--- a/
lisp/apropos.el
+++ b/
lisp/apropos.el
@@
-297,11
+297,12
@@
Value is a list of offsets of the words into the string."
(defun apropos-score-str (str)
"Return apropos score for string STR."
(if str
- (let ((score 0)
- (l (length str))
+ (let* (
+ (l (length str))
+ (score (- (/ l 10)))
i)
(dolist (s (apropos-calc-scores str apropos-all-words) score)
- (setq score (+ score 1000 (
- (/ l 10)) (
/ (* (- l s) 1000) l)))))
+ (setq score (+ score 1000 (/ (* (- l s) 1000) l)))))
0))
(defun apropos-score-doc (doc)